       if let r = self.R {
         r.insert(n)
       } else {
-        self.R = Candy(n, self)
+        self.R = BinaryTree(n, self)
       }
     }
   }

      if let l = self.L {
        l.insert(n)
      } else {
        self.L = Candy(n, self)
      }
    } else if n == self.value {
      self.count += 1

      }
    } else if n == self.value {
      self.count -= 1
      if self.count == 0 {
        if let l = self.L, _ = self.R { // both
          let maxValue = l.maximum().value
          self.value = maxValue
          self.count = 1
          l.remove(maxValue)
        } else if let l = self.L { // L only
          self.parent?.replace(self, with: l)
        } else if let r = self.R { // R only
          self.parent?.replace(self, with: r)
        } else {
          self.parent?.replace(self, with: nil)
        }
      }
    } else {
      if let r = self.R {
        r.remove(n)
