move the pagination aggregate logic to show