updated problem 2