testing replaceSubstring()