added a data object for handling "digits".
now using a data object to hold the digit and its methods.