updated processDigit