HW2 solutions