Completed Chapter 4 Code & exercises