implement normailze_str; move some funs to convcommon.py