add graph structure