hw4 solution