There are “nice guys” and there are good people. Genuinely good people are characterized by their selflessness and truly  caring about the wants and needs of those around them. By contrast, nice guys might put up a charming front, but ultimately care more about their own self-interests than anybody else's, and turn out not to be so nice if they don’t get their way.

Related: How I Met Your Mother: How Ted Changed From Season 1 (& How He's The Same)

As the protagonist of Ted wasn't always the nicest guy, though.

Nice Guy: Pressuring Stella To Date Him

HIMYM Ted Stella

How I Met Your Mother fans tend to disdain Stella as one in a string of Ted’s romantic interests who wound up doing wrong by him when she left him at the altar. It’s worth considering, however, how the two of them got together in the first place.

Related: How I Met Your Mother: Every Secondary Character, Ranked By Likability

Some parts of HIMYM have aged better than others. Ted's courtship of Stella exists in a gray area. Ted saw Stella professionally. He was the one who pushed for them to date, even after Stella was clear that she didn’t have the time for it. He kept pursuing her, though, culminating in his two-minute date to woo her. Sure, the concept was sweet, but Ted also could have heeded what she said from the start—that her career and family life didn’t leave time for a man. It’s only fitting that she wound up reuniting with her daughter’s father.

Good Person: Taking Robin To Barney

HIMYM Barney Robin The Last Page.

In “The Final Page”—a mid-season finale for season eight—a long and winding storyline pays off with Barney proposing to Robin.

Ted plays an instrumental role here. Though Robin was supposed to be his date for a party in his honor, he instead drops her off to see Barney. Ted may not have been clued into Barney’s master plan, but he was conscious enough of Robin’s feelings to send her to him, sincerely putting what she wanted ahead of his own selfish desires.

Nice Guy: Driving Victoria Off Into The Sunset

How I Met Your Mother: Ted and Victoria drive into a sunset

One of the final images we get from season seven of How I Met Your Mother is Ted quite literally riding off into the sunset with one of the show's best female characters, Victoria. They skip out on her wedding in favor of starting a new life together. It’s a romantic moment for the picturesque scene and because Victoria often felt like “the one who got away” for Ted.

It’s hard to get past the fact that Ted was breaking up a marriage, though. Sure, Victoria chose to run away in the first place and was at least equally responsible for not actually going back for her ceremony. As someone who had personally been left at the altar before, though, Ted comes across as pretty self-absorbed in this moment. His subsequent efforts to backtrack and lessen the blow to the groom are half-hearted at best, as Ted really ought to have waited for Victoria to wrap up her other relationship before he got involved with her again.

Good Person: Consoling Marshall

Ted and Marshal sitting in rain

Season one of How I Met Your Mother wraps up in an incredibly conflicted place. On one hand, Ted is triumphant. He shares a kiss with Robin that starts a relationship that Ted had angled toward since the first episode. On the other hand, Lily has left Marshall, and Ted finds him distraught on the front stoop for one of the show's most emotional moments.

It would have been easy for Ted to have focused on himself in this moment, basking in his new relationship and leaving his roommate to fend for himself. Ted immediately consoling Marshall demonstrated Ted being a good friend, as did his sensitivity to Marshall’s needs in the opening episodes of season two.

Nice Guy: Giving Barney Classes

HIMYM Barney In Robin 101

With Robin dating Barney, and Ted starting his new career as a professor, worlds collide. On the premise of simultaneously get some extra teaching practice, put his knowledge of Robin to use, and help out Barney, Ted gives his friend classes about how to be a good partner to Ms. Scherbatsky.

Ted doesn’t seem to have overtly bad or selfish intentions in this choice. However, he objectifies Robin—his ex-girlfriend and still his close friend at that point—in offering these classes that she’s quite understandably offended by once she finds out about them.

Good Person: Christmas Lights For Robin

Ted puts on a light show for Robin in How I Met Your Mother.

The “Symphony of Illumination” episode of How I Met Your Mother focuses on Robin’s realization that she can’t have children. It’s a delicate matter that the show handles with sensitivity and thoughtfulness.

Ted doesn’t know what’s going on for Robin in this moment, but does recognize that his friend is very sad. Without any clear pretense of trying to get back with her or otherwise benefit himself, Ted skips going home for Christmas so he can be with her, and even goes so far as to set up an elaborate lights display that shines to the rhythm of AC/DC’s “Highway To Hell” to cheer her up in their apartment.

Nice Guy: Chasing The Open Window

HIMYM The Window Maggie

Season five, episode ten, “The Window” focused on Ted chasing down his opportunity to connect with old crush Maggie, who repeatedly finds herself in committed relationships, with little-to-no time in between. Ted does seem to have a degree of chemistry with Maggie and we can’t blame him for trying.

Nonetheless, Ted’s pursuit of Maggie includes trying to stave off anyone else from getting together with her, and he makes no bones about selling his students short so he can fixate on her while he’s teaching. These aren’t exactly a good guy's choices.

Good Person: Trying Not To Hurt The Slutty Pumpkin’s Feelings

HIMYM Slutty Pumpkin

After a chance encounter with a woman dressed as a “slutty pumpkin” one Halloween, Ted spends years following that night trying to meet up with her again. It's a running gag for the show's Halloween episodes.

In season seven, Ted does at last find her, as guest star Katie Holmes plays his love interest for the episode. The two have absolutely no chemistry. While some of Ted trying to make it work comes down to fulfilling his own hopes and expectations, there’s also a healthy dose of him trying to protect her feelings as he soldiers through awkward moment after awkward moment.

Nice Guy: Ruining The Trip To Paris

HIMYM Ted Karen College

Before the name Karen gained the connotations it has today, How I Met Your Mother contributed to the vibe that Karens were bad people. Laura Prepon had a recurring role by that name as Ted’s college girlfriend who occasionally resurfaces in his life to often as not make Ted and friends miserable. There's little doubt she's one of the most hated of the many girlfriends who appear throughout the show.

Upon one of her returns, Lily reminds Ted of how she ruined a trip to Paris for the gang. Lily had been studying abroad when Marshall came to visit her and brought along Ted and Karen. Drama between the latter couple, including a breakup on the trip. It’s understandable Ted would be upset. Nonetheless, his choice to involve Karen at all, and then to predictably allow her to ruin things sets him up to play the “nice guy” victim in ways that spoil everyone’s good time.

Good Person: Going To Robots Versus Wrestlers

HIMYM Ted Wrestler Doppleganger

Late in season five, Ted connects with a high society crew that momentarily looks as though they could take the place of his friends. Such a separation could have marked one of the saddest moments of the show, but he instead recognizes that he’s not entirely at home with them. A photograph of a luchador doppelganger from the group seals the deal on Ted returning to his true friends.

This moment solidifies Ted as the kind of guy who will ultimately put his friends first, regardless of opportunities for social advancement or even being more appreciated for his intellect, at the end of the day, he’s a loyal friend. That’s one of his truest good guy traits.

Next: HIMYM: 10 Worst Things Ted Has Ever Done