update substring