added digit_sum method