add replacement of \r characters