added cmgd and a debug option for cmgl