prepping query object