modernized FSM