Working on the VE algorithm.