Added code for calculating VCG.