chapter8example(1-8)