Performed the exercises at the end of chapter 6