made FSM work