While much of the country was trying to achieve the perfect char on their burger or capture the perfect firework pic for the gram, Kendrick Lamar and Janelle Monae paid a visit to the White House to perform for an audience of military heroes and their families. The celebration also happened to coincide with Malia Obama's 18th birthday, so the president was flanked by Grammy winners as he sung for his eldest daughter.

"These two, I’ve gotten a chance to know, and they are both amazing artists and talented and popular and doing great things, but they’re also very conscious about their responsibilities and obligations," President Obama said of Lamar and Monae in the video below. "And they put in a lot of time and effort on behalf of a lot of causes that are important."

Kendrick performed a censored set, which included "Money Trees," "Swimming Pools," "Bitch Don’t Kill My Vibe," "Poetic Justice," "A.D.H.D." and "Alright." Watch his performance up top.

Afterward, President Obama offered these words, "On behalf of all of us, obviously we were hoping to share their incredible talents with the 5,000 people out on the fourth lawn. The 4th of July is about family, it’s about American family, it's about us getting together with the people we love most. We all know that our freedoms are dependent on an incredible group of men and women in uniform and their families who look out for us every single day."

Lamar visited the White House back in January where he kicked it with Obama and shot scenes for his “Pay It Forward” video where he talked about the importance of mentorship. Peep footage from the event above and below.

50 Great Albums From Rappers With Poetic Flows

More From XXL