adding edges to nodes