updated for lecture 2