     private var showingAllImages = false
     private var greaterThanOneArticleGroupCount = 0
     
+    
+    func shouldShowAllImages(currentPrecision: QuadKeyPrecision, currentSearchPrecision: QuadKeyPrecision, maxPrecision: QuadKeyPrecision) -> Bool {
+        return currentPrecision > maxPrecision + 1 || (currentPrecision >= currentSearchPrecision + 2 && greaterThanOneArticleGroupCount == 0)
+    }
+    
     func updateShouldShowAllImages(currentPrecision: QuadKeyPrecision, currentSearchPrecision: QuadKeyPrecision, maxPrecision: QuadKeyPrecision) {
-        let shouldShowAllImages = currentPrecision > maxPrecision + 1 || (currentPrecision >= currentSearchPrecision + 2 && greaterThanOneArticleGroupCount == 0)
+        let shouldShowAllImages = self.shouldShowAllImages(currentPrecision: currentPrecision, currentSearchPrecision: currentSearchPrecision, maxPrecision: maxPrecision)
         
         if shouldShowAllImages != showingAllImages {
             for annotation in mapView.annotations {

                        groups.removeValue(forKey: adjustedQuadKey)
                    }
                }
                if group.articles.count > 1 {
                    greaterThanOneArticleGroupCount += 1
                }
            }
            
            updateShouldShowAllImages(currentPrecision: currentPrecision, currentSearchPrecision: currentSearchPrecision, maxPrecision: maxPrecision)
            
            var nextCoordinate: CLLocationCoordinate2D?
            var coordinate = group.location.coordinate
            

            }
        }
        
        guard let searchRegion = currentSearchRegion else {
            return
        }
        
        let deltaLon = visibleRegion.span.longitudeDelta
        let lowestPrecision = QuadKeyPrecision(deltaLongitude: deltaLon)
        
        let searchDeltaLon = searchRegion.span.longitudeDelta
        let lowestSearchPrecision = QuadKeyPrecision(deltaLongitude: searchDeltaLon)
        
        let maxPrecision: QuadKeyPrecision = maxGroupingPrecision

        let currentPrecision = lowestPrecision + groupingPrecisionDelta
        let groupingPrecision = min(maxPrecision, currentPrecision)
        
        let currentSearchPrecision = lowestSearchPrecision + groupingPrecisionDelta
        
        guard groupingPrecision != currentGroupingPrecision else {
            updateShouldShowAllImages(currentPrecision: currentPrecision, currentSearchPrecision: currentSearchPrecision, maxPrecision: maxPrecision)
