added pagination class to model