calc from lecture 2