updated problem 8