updating code for hw2