                 }
                 
                 // get renewed array
-                let newlySortedAlbums = sortedAlbums(fromAlbums: fetchedAlbumsArray[section])
+                let newSortedAlbums = sortedAlbums(fromAlbums: fetchedAlbumsArray[section])
              
                 // find removed indexPaths
                 var removedIndexPaths = [IndexPath]()
                 var removedAlbums = [PHAssetCollection]()
                 for (i, oldSortedAlbum) in oldSortedAlbums.enumerated().reversed() {
-                    guard newlySortedAlbums.contains(oldSortedAlbum) else {
+                    guard newSortedAlbums.contains(oldSortedAlbum) else {
                         removedAlbums.append(oldSortedAlbum)
                         removedIndexPaths.append(IndexPath(row: i, section: section))
                         oldSortedAlbums.remove(at: i)

                
                // check thumbnail
                if isThumbnailChanged(changeDetails: assetsChangeDetails) {
                    thumbnailUpdatedIndexPaths.append(IndexPath(row: row, section: section))
                }
                
                // update fetch result for each album
                fetchMap[album.localIdentifier] = assetsChangeDetails.fetchResultAfterChanges
                
                // reload if hasIncrementalChanges is false
                guard assetsChangeDetails.hasIncrementalChanges else {
                    for subscriber in subscribers {
                        if let indexPathForAlbum = indexPath(forAlbum: album) {
                            subscriber.assetsManager(manager: self, reloadedAlbum: album, at: indexPathForAlbum)
                        } else {
                            logw("Failed to find indexPath for album: \(album.localizedTitle ?? "")")
                        }
                    }
                    continue

                    }
                }
            }
            
            // notify unqualified albums
            if albumsToRemove.count > 0 {
                DispatchQueue.main.sync {
                    for subscriber in subscribers {
                        subscriber.assetsManager(manager: self, removedAlbums: albumsToRemove, at: indexPathsToRemove)
                    }
                }
            }
            
            // insert & notify newly qualified albums
            let newSortedAlbums = sortedAlbums(fromAlbums: fetchedAlbumsArray[section])
            let insertedInfo = insertedIndexPaths(from: newSortedAlbums, using: sortedAlbumsArray[section], section: section)
            sortedAlbumsArray[section] = newSortedAlbums
            
            // notify inserted indexPaths
            if insertedInfo.indexPaths.count > 0 {
                DispatchQueue.main.sync {
                    for subscriber in self.subscribers {
                        subscriber.assetsManager(manager: self, insertedAlbums: insertedInfo.albums, at: insertedInfo.indexPaths)
                    }
                }
            }
        }
        
        return thumbnailUpdatedIndexPaths
    }
    
    public func insertedIndexPaths(from newAlbums: [PHAssetCollection], using oldAlbums: [PHAssetCollection], section: Int) -> (indexPaths: [IndexPath], albums: [PHAssetCollection]) {
        // find inserted indexPaths
        var insertedIndexPaths = [IndexPath]()
        var insertedAlbums = [PHAssetCollection]()
        for (i, sortedAlbum) in newAlbums.enumerated() {
            guard oldAlbums.contains(sortedAlbum) else {
                insertedAlbums.append(sortedAlbum)
                insertedIndexPaths.append(IndexPath(row: i, section: section))
                continue
            }
        }
        return (insertedIndexPaths, insertedAlbums)
    }
    
    public func photoLibraryDidChange(_ changeInstance: PHChange) {
