transition to state machines