add sample code for ch2_part2