Method changed from text to replace.