make routing system like a state machine by implementing the ui-state component