added testing code for motor encoders