refactor initial replacements