Bill Gates had agreement with wife he could spend one weekend each year with former girlfriend 4 years ago