writing for the first part of lecture 8.