On July 31, Nick Castellanos was sitting in the dugout at Angel Stadium in Anaheim, waiting to face the home team with his Detroit Tigers. But before he could walk out to the plate to bat second for his team of nine years, Castellanos got a tap on the shoulder. His manager, Ron Gardenhire, needed to talk to him.

Castellanos had been traded to the Cubs less than a minute before the season's mid-afternoon deadline. Acquiring him was the final move of a front office that had been busy in the week leading up to deadline day, filling in roster holes as best as they could.

The Cubs entered 2019 with a payroll exceeding the MLB's threshold for a luxury tax ($206 million). At the onset of the season, it appeared unlikely they'd be able to make significant roster changes. And yet, by the end of July, the team had addressed need after need.

“If they’re not confident in the group, you’re not going to see that occur,” Cubs manager Joe Maddon said of the recent moves. “We have very competitive people everywhere here, and we all want to win.”

Those same competitive people built 2019's roster with a few obvious flaws. Most notably, the Cubs lacked a clear-cut closing pitcher. Weeks earlier, as spring training began, chairman Tom Ricketts had infamously declared his team out of money, so there was little reason to think the cavalry was coming to help.

But in early June, the Cubs spent $43 million on closer Craig Kimbrel, who'd last played for the Red Sox. At the time, Kimbrel had recorded 333 career saves — the most among active pitchers. (The general belief is that Ben Zobrist’s absence from the team, due to personal reasons, freed up the money to add Kimbrel.)

Then, in the span of five days in late July, the Cubs traded for relief pitcher Derek Holland, second baseman Tony Kemp, and Castellanos, who's playing in the outfield.

“Being in the position that we are,  the needs were very obvious,” Maddon said days after the trade deadline. “You have to try to find the right match.”

Holland, a southpaw, will be able record important outs against left-handed batters. This season, opponents are hitting just .200 against his fastball and well below that on his sinker and slider.

Meanwhile, Kemp can fill the offensive void left by Zobrist at second base, which David Bote, Addison Russell, and Daniel Descalso have so far failed to do. Kemp had been designated for assignment by the Astros on July 26, and on the 31st, while sitting on his couch in Nashville with his wife, heard that he may be headed to the North Side.

“Probably 10 minutes later I got a call from [Astros general manager] Jeff Luhnow,” Kemp said. “And [then I was] on that next flight out to St. Louis.”

Kemp arrived in St. Louis during the third inning of that night’s matchup with the Cubs, so he didn’t play; but he said Anthony Rizzo, Kris Bryant, and Kyle Schwarber all made it a point to say hello.

Castellanos, for his part, was traded so abruptly he hasn't had a chance to get to his house in Michigan and retrieve his belongings. "I'm in a hotel right now," he said.

Getting this whole group — Kimbrel, Holland, Kemp, and Castellanos — isn't just lucky, but impressive. Zobrist's absence may have helped the Cubs afford Kimbrel this year, but they were smart to spread his $43 million out evenly over four years. Next season, Cole Hamels, Pedro Strop, Brandon Kintzler, and Zobrist will all be off the books. Plus, a new Cubs-only TV channel will launch , ostensibly yielding the team some fun money.

As for what they gave up in talent, Holland cost the Cubs zero players. Kemp cost them only Martin Maldonado, who they'd landed in exchange for Mike Montgomery weeks earlier. And for Castellanos, it took sending only two minor-league pitchers to the rebuilding Tigers.

All four new Cubs could help the team stay atop the NL Central down the stretch, but Kimbrel and Castellanos will have the biggest roles. Kimbrel, a defined closer, realigns the bullpen, making relief roles clearer in earlier innings. And Castellanos, a strong header, changes the batting lineup from top to bottom, essentially lengthening it by cutting an easy out.

The new guys, for their part, seem pleased.

“This is where you want to be," said Kimbrel. "This is as pro as it gets. They won the World Series in ‘16. I remember watching on my couch and now I’m a part of it.”

Castellanos, who played with future Hall of Fame candidates Miguel Cabrera and Justin Verlander, has been equally impressed with players like Jason Heyward.

“Playing with J-Hey reminds me of playing with the old school veterans that I came up with when I was younger," he said. "Just how locked in and attentive to the game he is. I see it, and I like it.”

Expensive as it may have been, you can't accuse the Cubs of underperforming at the trade deadline. Signing Kimbrel and trading for his other new teammates is a vote of confidence from the front office. They believe, once again, that this team can win its division and make a deep run in the playoffs.

All that's left now is for Maddon and his guys, old and new, to make good on that confidence.