make the graph factory