 protocol DownloadStateDelegate: class {
 
   func progress(for url: URL) -> DownloadProgress?
-  func completion(for url: URL) -> DownloadCompletion?
+  func completions(for url: URL) -> [DownloadCompletion]?
   func clearDownload(for url: URL?)
   func download(for url: URL) -> Download?
 

          let download = delegate?.download(for: requestUrl),
          let image = UIImage(data: download.data), error == nil else { return }
    url = requestUrl
    delegate?.completion(for: requestUrl)?(image)
  }

}


  let task: URLSessionDataTask
  let progress: DownloadProgress?
  var completions: [DownloadCompletion]
  var data: Data

  init(task: URLSessionDataTask, progress: DownloadProgress?, completion: @escaping DownloadCompletion,
       data: Data) {
    self.task = task
    self.progress = progress
    self.completions = [completion]
    self.data = data
  }

