             with: .smartAlbum,
             subtype: .smartAlbumSelfPortraits,
             options: nil)
-        resultCollections.enumerateObjects({ (object, index, stop) -> Void in
-            guard let collection = object as? PHAssetCollection else {fatalError()}
+        resultCollections.enumerateObjects({ (collection, index, stop) -> Void in
             let result = PHAsset.fetchAssets(in: collection, options: nil)
-            result.enumerateObjects({ [unowned self] (object, index, stop) -> Void in
-                let asset = object as! PHAsset
+            result.enumerateObjects({ [unowned self] (asset, index, stop) -> Void in
                 self.images.append(asset)
-                })
+            })
         })
     }
     

            options: nil) { image, _ in
                cell.imageView.image = image
        }

        return cell
    }
    

import Photos

class PhotosViewController: UICollectionViewController {
    
    @IBOutlet weak fileprivate var segmentedCtl: UISegmentedControl!
    
    fileprivate var images: [PHAsset]! = []
