update ch2 part3
add example code for ch2-6 and ch3-1