Adding text replacement function.