rewrote lecture 1