copying over the graph generation