Working dijkstra