4-year, $120 million deal to stay in San Francisco