replace %name macro