solved hamming distance.