VB implements dijkstra algorithm