When Joshua Tomaic would walk into his apartment last year and see the pizza boxes stacked high in the kitchen, he knew who the likely culprit was. There was only one Maryland men’s basketball player who could possibly be responsible for the mind-boggling ingestion of pie after pie — Ricky Lindo.

“He would eat a lot of pizza, man,” Tomaic said. “Like, come on.”

And there was Eric Ayala, one of the Terps’ starting guards, who would eat Popeyes’ fried chicken or Chinese food before games. In high school, he said, it was no big deal. But when he started facing Big Ten opposition, he realized that his food habits couldn’t last.

“That’s just me being a freshman and not knowing,” Ayala said.

But shortly after Maryland lost in the NCAA tournament last year, director of basketball performance Kyle Tarp began a team detox — fewer greasy meals, more nutrient-rich foods to help transform his players’ bodies over the offseason. And by focusing on healthier eating habits to go along with weightlifting and conditioning, Maryland players started seeing changes.

[Read more: Hampered by injuries, Maryland basketball’s Chol Marial is on path back to full strength]

Lindo said he feels lighter and stronger without a near-constant stream of Chick-fil-A and pizza entering his body. Ayala feels quicker and has an extra skip in his step. There’s Jalen Smith, whose “Stix” nickname has jokingly shifted to “Logs” after his offseason makeover. And thanks to his new routine, Serrel Smith thinks he can compete for rebounds better than he once did.

Mealtime — and the snacks between — became as much a part of Maryland’s search for success as on-court training.

“Pizza and Chick-fil-A every day, that ain’t going to cut it,” Serrel Smith said. “So, we had to change some stuff up.”

Tarp held individual meetings with each player at the end of last year to discuss what changes they wanted to make with their bodies this offseason. For most, that meant gaining weight in the form of muscle to better compete with the big bodies around the conference. For others, such as Ayala, the goal was to lose weight.

Anthony Cowan is listed as 10 pounds heavier than last season. Lindo gained 20 pounds this summer, Serrel Smith put on five and Jalen Smith added 10. Most of the team receive snack packs from Tarp after practices with about 2,000 calories of food inside — peanut butter, yogurt, nuts and beef jerky, among other odds and ends — and the players are tasked with finishing the food between normal meals before the next practice.

Ayala, a self-described “big Oreos guy,” wouldn’t receive one. But he’d peek into his teammates’ bags, searching for snacks up his alley.

“I’d be looking in there like, ‘What do they got, what’s going on in there today?” said Ayala, who lost 10 pounds. “If I see something I like: ‘Yo, let me get that.’”

When Tomaic arrived in College Park in 2016, then a 6-foot-9, 220-pound freshman, he still felt undersized. He knew he needed to gain muscle mass to have any chance at minutes, so he took Tarp’s snack packs seriously.

It’s not as easy as it seems. Between eating three or four meals a day — Tarp gives an eating schedule with suggestions for that, too — putting away the various snacks and a gallon of water was tasking for Tomaic. But he kept reminding himself that the extra calories would pay off when he could run for longer periods of time and lift more.

“If you enjoy eating, then it’s fine,” Tomaic said. “I think it’s tough for everybody the first time.”

[Read more: In hopes of cementing a spot in the rafters, Anthony Cowan is back for Maryland basketball]

Since dropping weight, Ayala said he feels more capable of keeping up with Cowan in practice or Michigan State guard Cassius Winston during a game. There’s no more pregame fried chicken for him. Instead, there’s an added athleticism to his game, which he hopes can help him improve as a college player and someday help him reach the NBA.

“At this level, you need a little extra,” Ayala said. “You can’t get by by just eating Popeyes and thinking you’re going to go out there and compete against high-level players.”

For most of the sophomores on Maryland, the offseason body makeover is part of a commitment to see improvement from year one to year two in College Park. Serrel Smith can see the improvement in his game and hopes to continue building on it. Jalen Smith and Lindo hope the extra weight can help them down low.

Particularly for Lindo, who proved to be an effective defender but struggled to make a  significant offensive impact as a rookie, he feels his offseason efforts through Tarp’s snack packs and work in the weight room can pay dividends for his team, offering another weapon in the frontcourt.

“[Lindo] actually kind of looks like a grown man now compared to last year,” said Will Clark, who walked on to the varsity squad last year after playing for the club team. Then Clark chuckled, pointing to his own biceps — ones somewhat less defined than some of his teammates’ have become — as evidence that the snack packs make a difference.

“I didn’t have those,” Clark said, “so you can tell I didn’t beef up compared to them.”

Ayala lost his Oreos and bread, his Popeyes and Chinese food. For Jalen Smith, it was pizza and fried chicken, just like Lindo.

But those losses, however tasty, have led to gains in other areas — ones Maryland plans to show off this season.

“Putting away old habits,” Ayala said, “and building toward the future.”