refactored pagination helpers