   func visit(page url: Foundation.URL) {
     visitedPages.insert(url)
 
-    let task = URLSession.shared.dataTask(with: url) { [weak self] data, _, _ in
+    currentTask = URLSession.shared.dataTask(with: url) { [weak self] data, _, _ in
       defer { self?.crawl() }
       guard
         let data = data,

    }

    visitingCallback?(url)
    task.resume()
  }

  func parse(document: String, url: Foundation.URL) {

  let visitingCallback: ((URL) -> Void)?
  let wordFoundCallback: (URL) -> Void
  let completion: (Int) -> Void
  var currentTask: URLSessionDataTask?

  public init(
    startURL: URL,
