paginator pages() generator and reset() helper