Hamming function added