First half of lecture 4