Pagination and sorting working perfectly