moved pagination into pagination class