add function

allow search and pagination