Boston Celtics rookie wing Jaylen Brown had a tall task in this past season’s Eastern Conference Finals: guard LeBron James. He was nervous. Guard the greatest player of his generation in the playoffs? During his rookie season? If he didn’t somehow mitigate his pre-game anxieties before tip-off, he’d have already lost half the battle.

Brown had tested a bevy of other methods in the past in an attempt to alleviate his pregame jitters, but this time, the stage — the biggest of his career — necessitated an imaginative answer.

He finally settled on an unorthodox solution — to create a three-minute, 31-second rap song that he rapped, produced and composed himself, one that would boost his self-esteem and get him past the urge to vomit before games in nervousness. Brown listened to the song, entitled Building Blocks, several times before all five games of a playoff series in which he held his own against James defensively.

Game day and it’s time to focus in. … Is you ready, I can feel you breathing heavy, keep it steady. I just gotta pretend that I got it all together when I don’t. Probably wanna throw up but I won’t … just breathe. —Jaylen Brown, Building Blocks

Brown’s pregame routine was inspired by the teachings of his mental skills coach, Graham Betchart, who offers guides on how to circumvent the psychological obstacles that can hinder an athlete’s performance through the app, Lucid, which promotes a new, on-the-go vision on how to get nervous athletes in the right frame of mind before a big game.

The goal: toss out traditional hype-up music most athletes listen to before games. Instead, listen to meticulously crafted audio recordings — whether it be made by Betchart or produced by the players themselves — that target specific sources of stress, build focus, enhance mental fortitude and help overcome the number of other psychological hurdles that athletes, and people, go through on a day-to-day basis.

It’s an approach now utilized by NBA players like Brown, the Orlando Magic’s Aaron Gordon and the Sacramento Kings’ Skal Labissiere, all of whom worked with Betchart during their days on the high school circuit.

Labissiere utilizes the app before every game in lieu of music. Brown and Gordon listen to Lucid before every game as well, but supplement with the occasional Migos or Drake track. The three believe in the program enough to have joined the company’s advisory board. Gordon, who first worked with Betchart at age 11, is an investor in the company as well.

Brown credits his willingness to embrace technological innovations like Lucid to his year at UC Berkeley, which he picked in part due to its proximity to Silicon Valley, where he interned for a venture capital firm during the spring semester of his freshman year. Gordon, too, credits his roots in Silicon Valley — where he grew up and where his mom worked at Intel for 25 years — for his open-minded approach to trying new technological innovations.

Gordon said Betchart’s Lucid recordings have helped him conquer feelings that could have rattled him, such as when he was too scared to fail, too vulnerable or felt too much pressure.

Of paramount importance, Brown said, was Betchart’s primary message: Your performance on the court does not dictate your overall worth.

“In high school, if I had a bad game, I couldn’t eat,” Brown told SportTechie. “It would be that bad with me. I wouldn’t feel comfortable to eat because I felt that I didn’t deserve to.”

Breathe in, breathe out, listen to my voice breathe in, breathe out. (Expletive) you ain’t got a choice, breathe in, breathe out. I can feel my hands sweaty, I can feel my legs heavy. —Jaylen Brown, Building Blocks

Brown’s fear of failure was crippling while he was a junior at Wheeler High School in Marietta, Ga. — the bonafide star of a team expected to compete for the state championship. His team fought amongst Georgia’s best prep school teams, eeking by with two straight three point victories to make the Final Four. Wheeler had lost in that same round the year before, Brown’s sophomore year, and he and his teammates were itching to get over the hump. Wheeler took down Pebblebrook — a north Atlanta rival — 67-52 in the semifinal game, pitting them against Tift County for the state championship. Wheeler lost by 14.

Brown felt sick. Viscerally, physically sick. He made a call to Betchart immediately after leaving the arena premises, still reeling heavily from the loss.

“He was devastated,” Betchart said. “He thought it was over, this was who he was as a person, that he was a failure.”

Mentor and mentee talked extensively, processing through Brown’s feelings, giving him a space to vent and grieve. The phone call lasted close to an hour, but Brown didn’t feel much better physically or mentally. He missed the following week of school, bedridden from basketball-induced grief.

That was the last straw for Brown. He didn’t want to starve himself anymore. He didn’t want to have to ask mentors like Betchart for help after every tough loss. He was at the point where he couldn’t enjoy basic down time with friends in the aftermath of a bad game or a bad practice. He didn’t want to feel sick anymore.

So he vowed to change; vowed to disassociate on-the-court with off-the-court.

“It used to be, if I had a bad day on the basketball floor, I’d have a bad day in life,” Brown said. “And that’s what Graham broke down: there’s going to be ups and down in a game, and you can’t really control whether you’re going to be 10 for 10 or 0 for 10, so, I quickly had to un-identify myself that basketball was me and I’m just a person playing basketball, and I’m still a person first.”

If that psychological transition hadn’t taken place, Betchart thinks that Brown’s NBA prospects would have been limited.

“I don’t think he would have made it to the NBA if he didn’t make that transition and understand that basketball is what I do, not who I am,” said Betchart, who started working with Brown when the player was 15 years old. “He would have been a shell of himself. No matter how much talent you have, if you don’t make that transition and understand who you are at a deep level, it’s hard to make it because you’re just overwhelmed with pressure all the time, thinking your life’s on the line, when really it’s just a bouncy-ball game.”

And, accordingly, Brown shifted his mindset heading into his senior year, letting bad games, bad halves, bad possessions, go with increased ease while engaging more fully with his mindfulness training, allowing for his personal identity to progress from being simply “Jaylen the basketball player,” to also being Jaylen the human being, Jaylen the history buff — Jaylen the musician.

“No hard feelings anymore,” Brown said. “That’s what Lucid helps me with — no hard feelings.”

Wheeler won the state championship his following season.

Graham catchin up with @skal_lab and @fchwpo last night in Sacramento. Two players who work extremely hard on building their mindsets. A post shared by Lucid (@trainwithlucid) on Feb 9, 2017 at 7:39am PST

I just need to inhale, then exhale, even when I’m in hell, I just gotta exhale. —Jaylen Brown, Building Blocks

There are limits to Lucid. The app, and Betchart’s teachings, don’t guarantee success.

In 2016, Gordon gained acclaim for his second-place performance in the NBA’s Slam Dunk Contest, which he said was aided in large part by Betchart’s recordings. “I did things that went flawlessly,” he said. “That was definitely thanks to Lucid and practice and preparation and mental training and Graham and Jason [Stirman, Lucid’s CEO].”

But when Gordon tried for the title again in this year’s dunk contest, he missed all four dunks in a turn and failed to advance past the first round. While Betchart’s training didn’t return Gordon to glory, it allowed him, like Brown, to bounce back and stay level-headed after a difficult, emotional setback.

“Without Lucid I think that dunk contest would have put me into a slump,” Gordon said. “I think that really would have crushed me. It allows you to almost cope. It helps you persevere through the times when things don’t go according to plan — the times that you once saw as a failure can now be reframed as a life lesson.”