update after StateMachine refactoring