simplified paging logic