Almost done dijkstra's algorithm