added pagination and search