Added findReplaceTag functionality