modif extendedDijkstra with lambdas