lecture 6 exercise 2