pagination was refactored