Added todigits and fromdigits