lecture 6.3, assignment 7