Finish exercise chapter 3