code for hw4