Finished Chapter 10 excercise