week-9 problem-6 solved.