finish hw4 problem 1