finished Chapter 9.1.3