Simple fsm.