Added code to shift bits into the shift register