implementing ShiftRegister