change gsub to tr because multiple times faster in benchmarks