Doing exercises end of chapter 5