completed sum_of_digits