add ex6-9 from chap9