Add more sample code for chap 4.