lecture 7 exercise