                     ctl.path[k + offset] = ctl.pathPosition.count
                     let kRes = calcFootPrint(ctl: ctl, fp: fp, index: k + offset)
                     
-                    (fp[k + offset], ctl.pathPosition[ctl.pathPosition.count]) = snake(xAxis: xAxis, yAxis: yAxis, xAxisCount: xAxisCount, yAxisCount: yAxisCount, k: k, y: kRes.y, r: kRes.r)
+                    (fp[k + offset], ctl.pathPosition[ctl.pathPosition.count]) = snake(xAxis: xAxisPointer, yAxis: yAxisPointer, xAxisCount: xAxisCount, yAxisCount: yAxisCount, k: k, y: kRes.y, r: kRes.r)
                 }
             }
             
             ctl.path[delta + offset] = ctl.pathPosition.count
             let deltaResult = calcFootPrint(ctl: ctl, fp: fp, index: delta + offset)
             
-            (fp[delta + offset], ctl.pathPosition[ctl.pathPosition.count]) = snake(xAxis: xAxis, yAxis: yAxis, xAxisCount: xAxisCount, yAxisCount: yAxisCount, k: delta, y: deltaResult.y, r: deltaResult.r)
+            (fp[delta + offset], ctl.pathPosition[ctl.pathPosition.count]) = snake(xAxis: xAxisPointer, yAxis: yAxisPointer, xAxisCount: xAxisCount, yAxisCount: yAxisCount, k: delta, y: deltaResult.y, r: deltaResult.r)
             
-            if fp[delta + offset] >= yAxis.count {
+            if fp[delta + offset] >= yAxisCount {
                 break
             }
             

                return EditDistanceAlgorithmContainer(indexPath: IndexPath(row: secondIdx, section: firstIdx), element: elm)
            }
        }
        let xAxis: [EditDistanceAlgorithmContainer<T>]
        let yAxis: [EditDistanceAlgorithmContainer<T>]
        var ctl: Ctl
        if _from.count >= _to.count {
            xAxis = _to
            yAxis = _from
            ctl = Ctl(reverse: true, path: [], pathPosition: [:])
        } else {
            xAxis = _from
            yAxis = _to
            ctl = Ctl(reverse: false, path: [], pathPosition: [:])
        }
        let offset = xAxis.count + 1
        let delta = yAxis.count - xAxis.count
        let size = xAxis.count + yAxis.count + 3
        var fp = Array(repeating: -1, count: size)
        ctl.path = Array(repeating: -1, count: size)
        ctl.pathPosition = [:]
        
        let xAxisCount = xAxis.count
        let yAxisCount = yAxis.count
        
        var p = 0
        while(true) {

        return (r, max(lsP, rsP))
    }
    
    private func snake<T: Comparable>(xAxis: UnsafeMutablePointer<EditDistanceAlgorithmContainer<T>>, yAxis: UnsafeMutablePointer<EditDistanceAlgorithmContainer<T>>, xAxisCount: Int, yAxisCount: Int, k: Int, y: Int, r: Int) -> (y: Int, point: Point?) {
        var y = y
        var x = y - k
        
