How I Met Your Mother
Tim Gunn appeared in episode 4 of "How I Met Your Mother" as Barney's personal tailor. CBS

WARNING: SPOILERS AHEAD. Do NOT read unless you want to find out what happened in episode 4 of "How I Met Your Mother."

Can Barney and Ted still be friends? That’s what episode 4 of “How I Met Your Mother’s” explored Monday.

At the end of episode 3, “Last Time In New York,” Barney dropped the bomb on Ted that he saw him with Robin at the carousel. With the wedding only 51 hours away, can the two salvage their bromance before the nuptials?

“The Broken Code” kicked off with Barney explaining that Robin called him to help look for her locket a week ago. But when he arrived, he found her holding hands with Ted.

Ted explains that he was just trying to be a good friend and help out since Barney was busy. And surprisingly Barney calmly answers: “Cool. Just wanted to air that out, bro-to-bro.”

With everything settled, Ted begins to cry … and not because he feels guilty or he’s happy that Barney isn’t mad. It’s because he broke the $600 bottle of scotch.

Barney and Robin’s wedding is only a few days away, and Marshall is still driving across the country. Lily’s drinks from Linus can only take her so far, so she hatches a plan to bring Marshall to life … face timing with a pillow dressed up like her husband.

But that’s not the only problem that Lily has on her hands – Robin is upset that Lily isn’t stepping up for her maid of honor duties. Unfortunately, what Robin doesn’t realize is that it’s not all Lily’s fault. For instance, Robin believes that Lily threw her a lame bachelorette party since the only person to show up was Patrice. But Lily breaks the news that the reason why the bachelorette party wasn’t overflowing with people wasn’t because she forgot to invite people … but because Robin had no girlfriends to invite.

With Lily set to move to Rome for a year, she figures out that Robin is going to have zero friends … so she hatches a plan … a plan to find Robin a new girlfriend. Taking a page out of Barney’s playbook, Lily sets Robin up with a girl crying at the bar. And they’re perfect for each other! Turns out she’s crying over the New York Rangers losing to the Boston Bruins, and she and Robin bond over hockey. But Lily lets her imagination get out of hand. Afraid of letting Robin become best friends with someone else, Lily threatens the girl when Robin leaves the room. Robin watches the whole exchange go down, though, and tells Lily that she doesn’t need any girlfriends because she has her.

While Lily is acting as the maid of honor, Barney has Ted doing a string of wild best man duties, like: rewriting more than 200 name cards in calligraphy (twice), switching rooms with Barney’s grandmother, and housing the dozen doves they plan to set loose at the wedding.

And while Ted dutifully does everything Barney wants, he’s shocked when Barney excludes him from the best man poker game … and replaces him with “Karate Kid” Billy Zabka. The reason? Barney’s actually NOT okay with Ted about the whole Robin carousel situation.

For Barney, Ted broke the “Bro Code” because “holding hands is the fourth-grade equivalent of banging.” But Ted insists that he was just being a friend. Since the two can’t agree they turn to a impartial third party -- pillow Marshall.

Marshall decides that the only way to decide if what Ted did was okay is if they re-enact the whole scene at the carousel. Trying to figure out if it’s weird or not, the truth finally comes out – Ted still has feelings for Robin.

While Barney tells Ted to turn off his feelings for Robin, Ted tells his friend that it’s not that easy. BUT he promises that it's something that he would never act on because of Barney.

With the air finally clear, the guys (including pillow Marshall) head back to the room to play their poker game – which besides Billy Zabka also includes Tim Gunn (Barney’s personal tailor) and Ranjit. But unfortunately, more trouble brews when Barney removes Billy Zabka from his position as best man and gives the title back to Ted.

“I’m coming for you, Ted Mosby,” Zabka warns.

What did you think of episode 4 of “How I Met Your Mother”? Let us know in the comments section.