added pagination for search page