exercise 2.11 in progress