First half of hw7