lecture 2 code