modified:   ChaCoCalc.m