Updating an August 2016 Inventors Digest item on the Beatles anthem “Hey Jude,” Paul McCartney recently reached a reported settlement with Sony ATV to reclaim rights to 267 of the group’s songs. U.S. copyright law played a major role in the agreement.

In 1985, to McCartney’s chagrin, the songs were purchased by late pop icon Michael Jackson for $47.5 million. They were sold by his estate to Sony last year for $750 million, but attorneys for McCartney then filed a federal lawsuit in U.S. District Court in a bid to reclaim ownership. They cited a 1976 federal copyright law that could enable him to control his own songs again as soon as Oct. 5, 2018.

Under the U.S. Copyright Act of 1976, songwriters could reclaim copyright from music publishers 35 years after they gave them away—or 56 years for songs pre-1978. Next year, it will have been 56 years since the Beatles’ published catalogue began with their first single, “Love Me Do.”

Unfortunately, under that scenario it could take McCartney eight more years to get full control of all Beatles songs, since the group continued until 1970. The former boyish Beatle would be 84 then, perhaps another reason he couldn’t just let it be. McCartney may have been further motivated by a court’s ruling in Great Britain last December. It refused to grant song rights to 1980s group Duran Duran, claiming that U.S. law did not apply in Britain.

One possible loose thread in the settlement is whether it covers every Beatles song—and if not, which ones were left out. How many published Beatles songs were there, anyway?

Reports have said the agreement entailed 267 Beatles songs, yet Answers.com says the Beatles recorded and released 214 different songs on original release albums, EPs and singles. Imdb.com says the Beatles created over 240 songs. Oft-cited (though not always accurate) Wikipedia lists 409 Beatles songs.

Either way, the settlement is a major victory for McCartney and ends a source of frustration for him for decades.