solved sumOfDigits