graph.rb modification