Finished chapter 3 exercises