Using sub instead of gsub