public boolean addEdge(Edge e, Point2D p1, Point2D p2){
      
      Node node1 = findNode(p1);
      Node node2 = findNode(p2);
      
      if(node1 != null && node2 != null){
          if(e instanceof CircleEdge){
              // when edge type is  circle edge, linked 2 nodes must same
              if(node1.equals(node2)){
                  e.connect(node1, node2);
                  edges.add(e);
                  return true;
              }
          } else {
              // when edge type is not circle edge, linked 2 nodes must different
              if(!node1.equals(node2)){
                  e.connect(node1, node2);
                  edges.add(e);
                  return true;
              }
          }
      }

      return false;
    }