updating to support replacements