refactor pager