updated lecture 9