use gsub instead of tr