init the graph