some reorganization of some of the string functions