alograthm now returns the string with the spaces interjected