Homework 4 part 1... some typos to work out..