HW5 solutions