remove newlines from strings