adding replaceMultiple function