increased functionality in Dijkstra