 import Foundation
 
 final class RegexManager {
-
     public init() {
         var characterSet = CharacterSet(charactersIn: PhoneNumberConstants.nonBreakingSpace)
         characterSet.formUnion(.whitespacesAndNewlines)
-        self.spaceCharacterSet = characterSet
+        spaceCharacterSet = characterSet
     }
 
     // MARK: Regular expression pool
 
-    var regularExpresionPool = [String: NSRegularExpression]()
-
-    private let regularExpressionPoolQueue = DispatchQueue(label: "com.phonenumberkit.regexpool", attributes: .concurrent)
+    var regularExpressionPool = [String: NSRegularExpression]()
+
+    private let regularExpressionPoolQueue = DispatchQueue(label: "com.phonenumberkit.regexpool", target: .global())
 
     var spaceCharacterSet: CharacterSet
 

    }

    func testStringLengthAgainstPattern(_ pattern: String, string: String) -> Bool {
        if self.matchesEntirely(pattern, string: string) {
            return true
        } else {
            return false

            return false
        }
        pattern = "^(\(pattern))$"
        return matchesExist(pattern, string: string)
    }

    func matchedStringByRegex(_ pattern: String, string: String) throws -> [String] {
