move dijkstra to graph.rb