update the query