small modifs to graph.jl, to be continued