exercise 2.7 and 2.8
exercise 2.9