Refactored 97 in terms of digits/undigits.