move navigation logic away from init page