             
             var filtered = maxima
             var temp     = [LocalMaximum]()
-            var treshold = Float(0.1)
+            var threshold = Float(0.1)
             
             for var k = 0 ; k<10 ; k++ {
-                temp = distinctMaxima(filtered, threshold: treshold)
+                temp = distinctMaxima(filtered, threshold: threshold)
                 if temp.count <= count {
                     break
                 }
                 filtered = temp
-                treshold += 0.05
+                threshold += 0.05
             }
             
             return [LocalMaximum](filtered[0..<count])

        get{
            var v = [float3]()
            for lm in self{
                v.append(lm.color/255)
            }
            return v
        }

                    let delta = max1.color-max2.color
                    
                    let distance = sqrt(pow(delta.r, 2)+pow(delta.g,2)+pow(delta.b,2))
                                        
                    if threshold>distance {
                        isDistinct = false
                        break
