Spread the use of state machine