updated lecture 4