add ability to use Hamming distance as well as Levenshtein/edit distance