updated problem 9