Add StateMachine