refactor calling of toxic_string functions