adding hamming distance computation