add pagination to the query screen