part3 of the homework