HW1 solution