finished new CG implementation utilizing only CT and C