changed repltran to remove '\n' characters