Added levenshtein distance calculation