https://medium.com/better-programming/easily-create-pagination-functionality-from-scratch-a738837ed6f2