modification about welsenc.cpp