Lecture 5 problem 2