Updated lecture 9 from 10/08/14