lecture 9 notes - halfway done