improve pagination slightly