expediate the algorithm by adding the virtual node