add name replacement functionality