* some fixes; implemented chapter 4