finish ch3_1 and ch3_2