Start to implement chapter 7 codes