save the query in a local variable