manual pagination example for in memory page arrays