add nodes to graph