updated problem 12