refactor the pagination params a bit