Modify StateMachine