HW6 - part3 completed