search and pagination works