add \'s before spaces