Completed chapter 4 examples (except last exercise)