public ArrayList<NewsItem> getNewsFeed() {
		ArrayList<NewsItem> news = new ArrayList<NewsItem>();
		ResultSet rs;
		try {
			String friendsList = getFriendIdsString();
			if (friendsList.length() == 0) return news;
			 rs = stmt.executeQuery("SELECT quizzes.*, users.username FROM quizzes INNER JOIN users ON quizzes.created_by = users.id WHERE created_by IN " + friendsList + " ORDER BY created_on DESC LIMIT 8");
			while(rs.next()) {
				news.add(new NewsItem(NewsItem.CREATED, rs.getString("username"), rs.getInt("created_by"), rs.getString("title"), rs.getInt("id"), rs.getTimestamp("created_on")));
			}
			rs = stmt.executeQuery("SELECT qh.*, q.title, u.username FROM quiz_history as qh INNER JOIN quizzes AS q ON qh.quiz_id = q.id INNER JOIN users AS u on qh.user_id = u.id WHERE user_id IN " + friendsList + " ORDER BY taken_on DESC LIMIT 8");
			while(rs.next()) {
				news.add(new NewsItem(NewsItem.TOOK, rs.getString("username"), rs.getInt("user_id"), rs.getString("title"), rs.getInt("quiz_id"), rs.getTimestamp("taken_on")));
			}
			Collections.sort(news);
			return news;
		} catch (SQLException e) {
			e.printStackTrace();
			return new ArrayList<NewsItem>();
		}
	}