made a tiny FSM system