encoder count working