update the replace new lines with a more streamlined version