improve the design of OcrDigit