add edges to a graph