Completed Apress Chapter 4