                 downloadTask.resume()
             }
         }
+        */
     }
 }
 


    struct ProgressReporter {

        let downloadTask: NSURLSessionDownloadTask

        typealias ReportAction = Double -> Void

        let reportProgressAction: ReportAction?

        let finishedAction: NSData -> Void
    }

    var progressReporters = [ProgressReporter]()



extension YepDownloader: NSURLSessionDownloadDelegate {

//    private func reportProgress(progress: Double, ofDownloadTask downloadTask: NSURLSessionDownloadTask) {
//        //progressReporters.filter({ $0.downloadTask == downloadTask }).map({ $0.reportProgressAction?(progress) })
//    }

    private func handleData(data: NSData, ofDownloadTask downloadTask: NSURLSessionDownloadTask) {
        //progressReporters.filter({ $0.downloadTask == downloadTask }).map({ $0.finishedAction(data) })

        for progressReporter in progressReporters {

            for i in 0..<progressReporter.downloadTasks.count {
                if downloadTask == progressReporter.downloadTasks[i] {
                    let finishedAction = progressReporter.finishedActions[i]
                    finishedAction(data)

                    println("finish data of \(downloadTask)")

                    break
                }
            }
        }
    }

    func URLSession(session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didFinishDownloadingToURL location: NSURL) {
