Changed the bit-identification to switch-case