removed some unused code
added Levenshtein distance