         return (regex, keys)
     }
 
-    func handlePath(_ path: String, regexStr: String, keys: [String], nonKeyIndex: Int) ->
-        (regexStr: String, keys: [String], nonKeyIndex: Int, status: Bool) {
+    func handlePath(_ path: String, regexStr: String, keys: [String], nonKeyIndex: Int,
+                    keyRegex: NSRegularExpression, nonKeyRegex: NSRegularExpression) ->
+                    (regexStr: String, keys: [String], nonKeyIndex: Int) {
 
             var nonKeyIndex = nonKeyIndex
             var keys = keys

        guard let fromPattern = fromPattern else {
            return (nil, nil)
        }
        var pattern = fromPattern
        var regexStr = "^"
        var keys = [String]()

        }
        
        for path in paths {
            (regexStr, keys, nonKeyIndex) =
                handlePath(path, regexStr: regexStr, keys: keys, nonKeyIndex: nonKeyIndex,
                           keyRegex: keyRegex, nonKeyRegex: nonKeyRegex)
        }

        regexStr.append("(?:/(?=$))?")
