Add COG calculation