updated lecture 8