HW6 solutions