move SQL out of MatchProfileViewServlet