added solution to problem 9