Implemented sort and page size feature