modified some functions in string_util