partially completed hwk4, excluding exercise 2