private static Message[] parseResults(ResultSet rs) throws SQLException {
		rs.last();
		int size = rs.getRow();
		Message[] messages = new Message[size];
		rs.first();
		for (int i = 0; i < size; i++) {
			String sender = rs.getString("username");
			Message m = new Message(rs.getInt("id"), sender, rs.getInt("sender"), rs.getInt("recipient"), rs.getString("body"), rs.getBoolean("message_read"), rs.getTimestamp("sent_on"));
			messages[i] = m;
			rs.next();
		}
		return messages;
	}