added sample solution for hw4