anchor.diff:                      matchesWest = true;
                   }
                   if(!matchesNorth && !matchesWest){
  -                    blobs[labelIndex] = new Set.from([cp]);
  -                    equivs[labelIndex] = new Set.from([labelIndex]);
  -                    labels[cp] = labelIndex;
  +                    blobs[groupIndex] = new Set.from([cp]);
  +                    equivs[groupIndex] = new Set.from([groupIndex]);
  +                    groups[cp] = groupIndex;
                       //increment the label index
  -                    labelIndex++;
  +                    groupIndex++;
                   } else if (matchesNorth && !matchesWest){
  -                    int label = labels[northPoint];
  -                    blobs[label].add(cp);
  -                    labels[cp] = label;
  +                    int group = groups[northPoint];
  +                    blobs[group].add(cp);
  +                    groups[cp] = group;
                   } else if (!matchesNorth && matchesWest) {
  -                    int label = labels[westPoint];
  -                    blobs[label].add(cp);
  -                    labels[cp] = label;
  -                } else if (matchesNorth && matchesWest && labels[northPoint] == labels[westPoint]) {
  +                    int group = groups[westPoint];
  +                    blobs[group].add(cp);
  +                    groups[cp] = group;
  +                } else if (matchesNorth && matchesWest && groups[northPoint] == groups[westPoint]) {
                       //current point matches north and west and they're already the same label
                       // p p
                       // p X
  -                    int label = labels[westPoint];
  -                    blobs[label].add(cp);
  -                    labels[cp] = label;
  +                    int group = groups[westPoint];
  +                    blobs[group].add(cp);
  +                    groups[cp] = group;
                   } else {
                       //current point matches north and west, but they are different labels
                       // b p
                       // p X
   
                       //add to lowest label
  -                    int northLabel = labels[northPoint];
  -                    int westLabel = labels[westPoint];
  -                    int minLabel = min(northLabel, westLabel);
  -                    blobs[minLabel].add(cp);
  -                    labels[cp] = minLabel;
  +                    int northGroup = groups[northPoint];
  +                    int westGroup = groups[westPoint];
  +                    int minGroup = min(northGroup, westGroup);
  +                    blobs[minGroup].add(cp);
  +                    groups[cp] = minGroup;
   
                       //update equivs
                       // union both sets of labels together
                       // for each group in labels, set equivs[group] to unioned list
  -                    equivs[northLabel].union(equivs[westLabel]);
  -                    equivs[westLabel].union(equivs[northLabel]);
  +                    equivs[northGroup].union(equivs[westGroup]);
  +                    equivs[westGroup].union(equivs[northGroup]);
                   }
               }
           }
  
positive.code: }
  
  class DisJointPoints {
      Map<Point, int> set = new Map<Point, int>();
  
      void operator[]=(Point key, int value){
          set[key] = value;
      }
  
      int operator[](Point key){
  
negative.code:     }
  
      int findGroup(Point point){
          return map[find(point)];
      }
  
      void union(Point a, Point b){
  