Improve FSM