Lecture 4, exercise 4