adding santis solution to problem 9