HW 8 exercise 1 solved.