Made VCG function a bit more readable