add pagination to work query