search engine working with pagination