Add pagination in the controller