Great teachers always find creative ways to engage their students. David Yancey, a teacher in Metro Atlanta, is doing just that by using popular songs to reinforce his history lessons. His reworking of Migos' "Bad and Boujee" for his students at Edwards Middle School has gone viral thanks to a tweet.

The 31-year-old teacher turned Migos' hit single into a new version called "Mad and Losing," which is a tale about the Civil War. The popular hook is changed to "My/your troops are mad and losing/Slowing them down is a doozy."

Yancey, who was named Teacher of the Year by Edwards Middle School in 2016, has been creating educational versions of hit songs for about three years. He told the Atlanta Journal-Constitution that he performs the songs after a lesson is completed in an effort to reinforce it.

“It’s not just random things that are being thrown together,” he said. “I’m very intentional ... on what content I’m delivering. I’ll do the lesson, and I pull it all together in a song.

Yancey's rendition of "Bad and Boujee" has attracted lots of attention, but he's got quite the catalog on his YouTube channel. The Atlanta teacher has capped off lessons with his own versions of "Black Beatles," "Hot Nigga" and "Hotline Bling." Check out Yancey's "Mad and Losing" below as well as few other examples of his work.

20 of Your Favorite Rappers Naming Their Favorite Rappers

More From XXL