added pagination to search page