replacing command fsm