Design FSM