updated problem 5