reworked pages class