first implementation of Hamming, not working yet