use Pagination class to do pagination