replaceContacts rewrite