         return INDEX_NOT_FOUND
     }
     
-    func score() -> Float {
+    func score(#firstString : String, secondString : String) -> Float {
         
         var shorter : String!
         var longer : String!
         
         // Determine which String is longer.
-        if count(self.firstString) > count(self.lastString) {
-            longer = self.firstString.lowercaseString
-            shorter = self.lastString.lowercaseString
+        if count(firstString) > count(secondString) {
+            longer = firstString.lowercaseString
+            shorter = secondString.lowercaseString
         }
         else {
-            longer = self.lastString.lowercaseString
-            shorter = self.firstString.lowercaseString
+            longer = secondString.lowercaseString
+            shorter = firstString.lowercaseString
         }
         
         // Calculate the half length() distance of the shorter String.
-        let halfLength : Int = Int(ceil(Float(count(shorter)) / 2))
-        
-        println("half: \(halfLength)")
+        let halfLength = Int(count(shorter)) / 2 + 1
         
         // Find the set of matching characters between the shorter and longer strings. Note that
         // the set of matching characters may be different depending on the order of the strings.

}


let jaro = JaroDistance(firstString: "martha", lastString: "marhta")
let d = jaro.getJaroWinklerDistance()
println("distance : \(d)")   // distance: 0.9611


let jaro1 = JaroDistance(firstString: "Hello", lastString: "hey")
let d1 = jaro1.getJaroWinklerDistance()
println("distance : \(d1)") // distance: 0.688



            let ch = String(Array(first)[i])
            
            // See if the character is within the limit positions away from the original position of that character.
            let jStart = max(0, i - limit)
            let jEnd = min(i + limit, count(second))
            
            if jStart < jEnd {
                for j in jStart ..< jEnd {
                    if String(Array(copy)[j]) == ch {
                        common = common + ch
                        let nsRange : NSRange = NSRange(location: j, length: 1)
