MEMPHIS, Tenn. — Imagine being a high school student, sitting in class and in walks Justin Timberlake and Timbaland.

That’s what happened in August as the Memphis native and his musician friends surprised students at Stax Music Academy in Memphis.

Timberlake partnered with Levi’s on the Levi’s Music Project. Together, they donated a state-of-the-art songwriting lab to the school where students can hone their songwriting skills.

Since 2015, Levi’s has partnered with artists and local communities around the world to develop the Levi’s Music Project, bringing music education resources to community-based programs and the next generation of young musicians.

Timberlake, Timbaland, Danja, Rob Knox and Elliot Ives spent two days working with students on their songwriting and performance. Together they polished songs students worked on for weeks. Students then performed a concert for their friends and family inside Stax’s iconic Studio A.

He and Levi’s also restored and updated Stax facilities and donated “The Song Lab” -- a remodeled facility meant for songwriting workshops and featuring stage-ready instruments and recording, audio and production equipment donated by Guitar Center, Gibson, Native Instruments, Shure, Universal Audio and Korg.

Timberlake also worked with students to develop an all-new songwriting class and established a scholarship so more Memphis students can attend Stax.