graph generation is implementegraph.