Changed dijkstra web to work with directed graph