Exercise 1&2 for Chapter 3