cleaning up query_user, update your stored procedures