do not maintain newlines
added ability to replace tabs