make cg optional

actually cg is deprecated now