Prolific producer Greg Berlanti isn’t leaving Warner Bros. Television anytime soon. The writer, director, and producer has a record 14 shows currently on the air and had two years left on his contract with WBTV when he decided to re-up, extending his tenure at the studio through 2024. Per THR, the new deal is said to be worth $400 million in all-cash guarantees, and Warners CEO Kevin Tsujihara and WBTV president Peter Roth aggressively pursued extending Berlanti’s contract as the uber-producer was being pursued by multiple other outlets.

The move comes at a time when powerhouse TV producers are moving to streaming. Ryan Murphy, who for years had been churning out hits under the FOX banner between FOX and FX, recently signed a mega-deal to move to Netflix, and ABC staple Shonda Rhimes is also making the switch to Netflix. But Berlanti’s deal differs from those of Murphy and Rhimes in that he’ll be getting a cash payout in return for giving up points on the back-end of his many, many shows. This decision makes more sense, however, as Berlanti’s shows don’t bring in the kind of ratings that Murphy or Rhimes’ output does, but it’s more than made up for in viewer loyalty.

Indeed, Berlanti helped jump-start The CW’s superhero universe and serves as executive producer on The Flash, Arrow, Supergirl, Legends of Tomorrow, and Black Lightning in addition to All American and Riverdale. Under this new deal, Berlanti will continue to produce those shows, in addition to NBC’s Blindspot, CBS’ God Friended Me and The Red Line, and Netflix’s upcoming The Chilling Adventures of Sabrina. Berlanti also serves as producer on the upcoming DC Universe Streaming Service series Doom Patrol and Titans, not to mention Lifetime’s You and CW Seed animated series Freedom Fighters: The Way and Constantine: City of Demons.

This deal keeps Berlanti in the fold at WBTV, but only in a television capacity. Berlanti’s film deal remains at Fox, where he wrote and directed this year’s swell romantic comedy Love, Simon. Berlanti will continue to develop new projects for Warners as well as its cable and digital subsidiaries.