minor changes to lecture 2. major revision of lecture 3