refactored pagination methods