update twda-learn.c and twda.c