Add part 4 of assignment 1