lecture 3 improved