finished: TODO can be better. when carry is 0, need not caculate digits[i]