Update StateMachine.java