add StateMachine