Added the code necessary for the shift register to function