remove \n \r from S