complete search and pagination