Added problem 9 solution