updating the navigation and routes logic