revision from chapter 5 to end