working encoder