Nearly complete 1st version of chapter 3