added CG to generic implementation