changes to lecture 8, 9, 10