update code style, add Levenshtein distance implementation