Made sure no multiple edges are added