Add code for hw4