     public func reduce() -> [Subcurve] {
         let step: BKFloat = 0.01
         var pass1: [Subcurve] = []
-        var pass2: [Subcurve] = []
         // first pass: split on extrema
         var extrema: [BKFloat] = self.extrema().values
         if extrema.index(of: 0.0) == nil {

            }
        }
        
        // second pass: further reduce these segments to simple segments
        // TODO: this loop is INSANELY SLOW
        pass1.forEach({(p1: Subcurve) in
            var t1: BKFloat = 0.0
            while t1 < 1.0 {
                var t2: BKFloat = 1.0
                for var t in stride(from: t1+step, to: 1.0 + step, by: step) {
                    if t > 1.0 {
                        t = 1.0
                    }
                    let segment = p1.split(from: t1, to: t).curve
                    if segment.simple {
                        t2 = t
                    }
                    else {
                        break
                    }
                }
                let segment = p1.split(from: t1, to: t2)
                pass2.append(segment)
                t1 = t2
            }
        })
        return pass2

    
    public func intersects(curve: BezierCurve, curveIntersectionThreshold: BKFloat = defaultCurveIntersectionThreshold) -> [Intersection] {
        precondition(curve !== self, "unsupported: use intersects() method for self-intersection")
        return BezierCurve.internalCurvesIntersect(c1: [Subcurve(t1: 0.0, t2: 1.0, curve: self)],
                                                   c2: [Subcurve(t1: 0.0, t2: 1.0, curve: curve)],
                                                   curveIntersectionThreshold: curveIntersectionThreshold)
    }
