writing for part 2 of lecture 8.