lecture 7 fixes