corrected hamming code, implemented pattern rotation