murge two queries into single query AND optimized the rest of the query