recursive solution to levenshtein