update answer to hw2 prob 1