finished problem 8

did problem 8 with a new bit of black magic concerning char representation of digitd