updated for hamming test