better and more flexible paging support