working on cmd_fsm