added some possible route change logic