added prototype for StateMachine