     }
 
     func writeSites(in country: Country) {
-        let whsSites = [String]()
+        let whsSites = sites.filter {
+            $0.iso_code.contains(country.alpha2.lowercased())
+        }
+
         let twhsSites = [String]()
 
         guard !whsSites.isEmpty || !twhsSites.isEmpty else {

            output.textStorage?.append(countryStart)
            return
        }
    }

    func writeFooter(for type: Document) {
        let total = whs + twhs
        let visited = whsVisited + twhsVisited
        let percent = total > 0 ? Double(visited / total) : 100
        let textFooter = NSAttributedString(string: """
            
            <p dir="ltr">WHS visited: \(whsVisited)/\(whs) — TWHS visited: \(twhsVisited)/\(whs) — TOTAL: \(visited)/\(total) (\(percent)%)</p>\n
            """)
        output.textStorage?.append(textFooter)

        if type == .html {


    @IBOutlet var output: NSTextView!
    
    var whsVisited = 0
    var twhs = 0
    var twhsVisited = 0
