built the paginator