hamming and levenshtein sitting in a tree