Solution to HW2