levenshtein prototype impl.