add edge for graph data structure, haven't tested yet