Before coding the state machine