adding pages to query