new working dijkstra