CalcSGM.do added.