updated week 6 problem 2