added universal formula for cg