remove \r in output string