creating a basic undirected graph structure