lecture 8 exercises