part 3,4 code done