HW6. Part3 complete