Adding weight to dijkstra