part 2 & 3 of assignment