lecture 3 code