hw5 through problem 1