modify our term doscript, by diwen
update to latest new code, by diwen