memoized recursive levenshtein distance added