rotary controlling motor speed and direction