 
     // MARK: - Private
 
-    private func add(_ task: URLSessionDataTask?) {
+    private func add(_ task: URLSessionTask?) {
         guard let createdTask = task else {
             return
         }
         taskQueue.insert(createdTask)
     }
 
-    private func cleanupQueue(for task: URLSessionDataTask?, didFail: Bool = false) {
+    private func cleanupQueue(for task: URLSessionTask?, didFail: Bool = false) {
         if let task = task {
             let _ = taskQueue.remove(task)
             if(didFail) {

                    throw error
                }
            }
        })

        // Add task to queue if it could be created


    private func shouldCallFinal() {
        if !hasOustandingTasks {
            final(failedTasks)
        }
    }

}
