added toDigit and fromDigit demos