added solution for sumDigits