Finalized lecture 8