First half of HW2