improved my fsm