         let maxX:Int = Int(floor(MKMapRectGetMaxX(rect) * scaleFactor))
         let minY:Int = Int(floor(MKMapRectGetMinY(rect) * scaleFactor))
         let maxY:Int = Int(floor(MKMapRectGetMaxY(rect) * scaleFactor))
-
+        
         var clusteredAnnotations = [MKAnnotation]()
-
+        
         lock.lock()
-
+        
         for i in minX...maxX {
-
+            
             for j in minY...maxY {
-
+                
                 let mapPoint = MKMapPoint(x: Double(i)/scaleFactor, y: Double(j)/scaleFactor)
                 
                 let mapSize = MKMapSize(width: 1.0/scaleFactor, height: 1.0/scaleFactor)

    public func displayAnnotations(annotations: [MKAnnotation], onMapView mapView:MKMapView){
        
        dispatch_async(dispatch_get_main_queue())  {

            let before = NSMutableSet(array: mapView.annotations)
            before.removeObject(mapView.userLocation)
            let after = NSSet(array: annotations)

                    
                    clusteredAnnotations.append(cluster)
                }
            }
            
        }
        
        
        lock.unlock()
        
        return clusteredAnnotations
