some refactoring
added a new print to string routine