updated lecture 5