revised Lecture and Homework 4 (work in progress)