Completing exercises for Chapter 3