private
undirected graph adding