Implemented the prototype for using pagination