working on integrating navigation with state machine