changed cast from (double) to (Double) in Dijkstra