Update stateMachine.py