added support for replacements