attaching rotary encoder