added working pagination to search results pages