pagination working with search