Adjusted the query