added levenshtein algorithm logic.