implmented hamming and its test