change spaces to add newlines