chapter 8 sort