inefficient recursive solution to levenshtein