change pagination logic in search results