First half of HW7