added code to turn ResultSet into list