set query equal to prepared query