Barack Obama learned how to write by reading James Baldwin, the former president told Michiko Kakutani in a New York Times interview.

“As much as anybody, when I think about how I learned to write, who I mimicked, the voice that always comes to mind the most is James Baldwin,” Obama said. “I didn’t have his talent, but the sort of searing honesty and generosity of spirit, and that ironic sense of being able to look at things, squarely, and yet still have compassion for even people whom he obviously disdained, or distrusted, or was angry with.”

Obama, the author of the new memoir A Promised Land, talked about the writers who influenced him as a young man, including Ralph Ellison, Zora Neale Hurston, Richard Wright, and Malcolm X.

“Whether it’s Whitman or Emerson or Ellison or Kerouac, there is this sense of self-invention and embrace of contradiction,” he said of his favorite writers from the U.S. “I think it’s in our DNA, from the start, because we come from everywhere, and we contain multitudes.”

Obama told Kakutani he didn’t read much while writing his memoir, worried that it might lead him to procrastinate, but picked up Marilynne Robinson’s Jack and Ayad Akhtar’s Homeland Elegies after he completed his book.

And asked what books he’d recommend to someone who had just moved to America, Obama suggested Ralph Ellison’s Invisible Man, Toni Morrison’s Song of Solomon, and John Steinbeck’s The Grapes of Wrath.

Michael Schaub is a Texas-based journalist and regular contributor to NPR.