handle pagination search and default data load