add xmg related changes