semi completed part 2 of ex4