updated lecture 7