a function that sums up the digit of a number