added toggling of pages & contents