added solution for sum of digits