While McKinley Tech students in Washington, D.C., were still settling into a new year of classes Friday, in walked the former president of the United States.

Barack Obama strolled in, casually asked if the high schoolers minded him crashing their class and then waited for the shock waves to subside.

The former president then spoke to the students about why he strived to engage with people their age during his eight years in office.

“One of the things I did throughout my presidency was I’d meet with groups of young people everywhere I went, whether it was here in the United States or when I was traveling overseas,” Obama told the teenagers. “Just to kind of hear from them, find out what they’re interested in, because I do believe that most of the problems we have are going to be solved by you.”

Obama posted video and photos of his day out on Instagram and Twitter.

A post shared by Barack Obama (@barackobama) on Sep 8, 2017 at 2:26pm PDT

Students at McKinley Tech are why he is “hopeful about the future,” Obama said.

“Make us proud,” his Instagram caption reads. “You’re the next generation of leaders, and we need you.”

Obama and his wife, Michelle, made frequent visits to schools around the world during their time in the White House. The first lady brought their daughters on a trip to promote girls’ education in West Africa. Friday’s visit was part of the former president’s “ongoing conversation with young people,” according to a statement obtained by The Hill.