Domino’s faced a major crisis in 2009 after two employees defiled their pizza on YouTube, but it only took the company three and a half weeks to restore a 22 percent drop in online sentiment, according to social media monitoring service SDL. How did they do it?

Domino’s president Patrick Doyle put up his own YouTube video, in which he explained that the rogue employees were not only fired, but also faced criminal charges. YouTube commenters responded with the usual sarcasm, but addressing the problem on the same platform where it started helped contain it.

United Airlines and Nestlé, which also faced backlash after a fail, were not so lucky. Below is a comparison of how the three companies’ responses to criticism from the public either reduced or increased the amount negative things people said about them online.

SDL created the infographic with data scanned from more than 60 billion posts from 250 million sources such as Facebook, Twitter, video sites and personal blogs.