added hamming code's correction method with unit tests