simplified test code for Exercise 9;