update lecture 17 and 18 notes.