avoiding multiple calls of #gsub!