add changes described in exercises from chapter 9