Added the encoder driving method