updated problem2