lec4
first half of lecture 6