pagesMain compiles - not yet tested