added better query reduce short-circuiting; added benchmark; refactored query to be more efficient