implement pagination for going through search results