         str = opts.extract(element) if opts.extract
         prev[prev.length] =
           string: str
-          score: DamerauLevenshtein(pattern, str)
+          score: levenshtein(pattern, str)
           index: idx
           original: element
         prev

    result[result.length] = ch
    idx++
  return {rendered: result.join(""), score: totalScore} if patternIdx is pattern.length
    
fuzzy.filter = (pattern, arr, opts={}) ->
  highlighted = arr.reduce(
    (prev, element, idx, arr) ->

      return a.original.length - b.original.length
    return compare if compare
    a.index - b.index

  # No matches? Sort the original array using Damerau-Levenshtein.
  if highlighted.length < 1
    highlighted = arr.reduce(
