added Damerau–Levenshtein distance function