added chapter 04 from mwd book