added modified levenshtein distance