creating a function that sums the digits of a number