finished chapter two (= half of lecture 3)