modified node name replacement code