Add Hamming distance