     static let kNotificationDataLoaded = "kNotificationDataLoaded"
     static let prefKey = "braveHttpsEverywhere"
     static let prefKeyDefaultValue = true
-    static let dataVersion = "5.1.9"
+    static let dataVersion = "5.2"
     var isNSPrefEnabled = true
     var db: Connection?
     let fifoCacheOfRedirects = FifoDict()

        guard let path = networkFileLoader.pathToExistingDataOnDisk() else { return }
        do {
            db = try Connection(path)
            NSLog("»»»»»» https-e db loaded")
            NSNotificationCenter.defaultCenter().postNotificationName(HttpsEverywhere.kNotificationDataLoaded, object: self)
        }  catch {

        return nil
    }

    private func mapExactDomainToIdForLookup(domains: [String]) -> [Int]? {
        guard let db = db else { return nil }
        var result = [Int]()

        var remaining = [String]()
        for domain in domains {
            if let cached = fifoCacheOfDomainToIds.getItem(domain) as? [Int] {
                result += cached
            } else {
                remaining.append(domain)
            }
        }

        let whereClause = "host = '" + remaining.joinWithSeparator("' OR host = '") + "'"
        let r = db.prepare("select ids, host from targets where \(whereClause)").generate()
        while let row = r.next() {
            guard let d = row[0] as? String else { continue }
            let data = d.substringWithRange(d.startIndex.advancedBy(1)..<d.endIndex.advancedBy(-1))
            let parts = data.characters.split(",")
            var cache = [Int]()
            for part in parts {
                if let j = Int(String(part)) {
                    cache.append(j)
                    result.append(j)
                }
            }
            fifoCacheOfDomainToIds.addItem(row[1] as? String ?? "", value: cache)
        }
        return result
    }

    private func mapDomainToIdForLookup(domain: String) -> [Int] {
        let parts = (domain as NSString).componentsSeparatedByString(".")
        if parts.count < 1 {
            return [Int]()
        }
        var s = [String]()
        for i in 0..<(parts.count - 1) {
            let slice = parts[i..<parts.count].joinWithSeparator(".")
            let prefix = (i > 0) ? "*." : ""
            s.append(prefix + slice)
        }
        if s.count == 0 {
            return [Int]()
        }
        if s.count == 1 {
            s.append("*." + s[0])
        }
        return mapExactDomainToIdForLookup(s) ?? [Int]()
    }

    func tryRedirectingUrl(url: NSURL) -> NSURL? {
        if url.scheme.startsWith("https") {
            return nil
        }

        if let redirect = fifoCacheOfRedirects.getItem(url.absoluteString) {
            if redirect === NSNull() {
