creating a function that sums the digits of numbers