lecture 5 & 6 notes