Finished up to Exercise 1.39