updated for query page