1-prim add edges2nodes that convert set of edges to map of nodes to edges