HW 5 - problem 1 finished.

finally got problem 1 to work