modify setPagination