VCRplus code Algorithm