Finish exercise chapter 5