add pages and fix some other stuff