added attributation for hamming_distance