modified the controller for new pagination