first version of lecture 8