finished Assignment4 part I