part3 of the assignment