adding graph, fixing compilation