Final hw4 homework