forgot to flip the bits in the code