chapter 5: revised, exercises , code