Update HW6 solution