Exercise from lecture 6.