Thermodynamic optimization of Mg-Nd system