Added new method that takes a Map of replacements