more work on lecture 2-3