lecture 4 almost complete