changed query to variable, easier to debug