Yet another imprementaion of Levenshtein distance