added pagination and search system