Changed gsub() to be just sub()