updating the query