Updated for hw4.1