finished part_2 and 4