HW6 Part 2 and 3