finished sort in chapter 10