Lecture notes + code for march 11