refactor levenshtein. because using with_index is simpler than each_with...