added chapters 4 & 5

since most of chapter 4 was done by hand or ad hoc, no R code was
produced