dijkstra method renamed