rewrote NavigationController and PageController