exercise 7.6.1, fixed