An equitable approach to mitigation in contract