Wrote basic paginator