add part 3 code