simplified the test code for Exercise 1;