hw4 problem 7 update