chap9 ex2: testing for ex1