Update CG.cpp