finished d dijkstra, bug fixes