Finally got dijkstra working!