beefed up the pagination