common code for vc program