updated Lecture 5