FSM (partly) implemented