Finish ex1 in chapter 8