encoder work