stateMachine modified, addTransitions to take in *args instead of a list structure