added support for dynamic name replacement