Executed chapter 6 exercises