The saga of Beastie Boys versus GoldieBlox appears to be winding to a close, as the two parties have reached a settlement in a lawsuit sparked by a GoldieBlox YouTube commercial that went viral late last year.

GoldieBlox, which sells toys designed to “inspire the future generation of female engineers,” used a reworking of the Beastie Boys’ 1987 hit “Girls” in an online spot in November, changing the original lyrics — which reference girls washing dishes and doing the laundry — to words about building and using your brain. When the Beastie Boys reached out to Goldiebox about the song, it filed a preemptive lawsuit, and the band, who are famously against the use of their songs in commercials, quickly responded with a suit of their own.

The terms of the settlement include a public apology from GoldieBlox to the band — which will appear on the company’s blog sometime today, according to The Verge — a donation of a percentage of its revenue to a charity of the Beastie Boys’ choice that supports science, math, and technology education for girls.

“Make no mistake, your video is an advertisement that is designed to sell a product and long ago, we made a conscious decision not to permit our music and/or name to be used in product ads,” the band wrote at the time of their lawsuit. “When we tried to simply ask how and why our song ‘Girls’ had been used in your ad without our permission, you sued us.