changed new line \r into \n