Completed exercises from chapter 3.5