working CG finding