extracted paging logic into a separate method
extracted paging logic into new class