refactor getPagingResult