use twoCharDigit() helper instead of inlined logic