Speaking today in Lima, Peru at an economic forum, Facebook cofounder and CEO Mark Zuckerberg vowed that his company would do its part to help fight the growing tide of hate speech and fake news that has engulfed his and other social media companies in controversy.

In recent days, Facebook has been the center of a heated debate over its role in spreading misleading and false information during the U.S. election season. While Zuckerberg has insisted the amount of fake news on Facebook is small and had little impact, critics insist the company needs to take its role as a global media company more seriously.

At the Asia-Pacific Economic Cooperation CEO Summit today, making a rare appearance in a suit and tie, Zuckerberg said he believed Facebook could tackle these issues, but he stressed that he had no illusions about how difficult they would be.

“I’m optimistic about all this. But as an engineer, I realize how hard it’s going to be,” he said. “We can work to give people a voice. But we also need to do our part to stop the spread of hate and violence and misinformation.”

Zuckerberg noted that the company has been building AI-driven tools to help spot violent content, whether it’s from terrorists or more personal indications, such as suicidal intent. And he also pointed to the company’s Safety Check tool that helps track people during disasters or violent events.

“We live in a relatively peaceful time,” he said. “But there’s still too much violence.”

His remarks came as part of a broader speech in which he sought to encourage government and business leaders to set loftier and more ambitious goals to improve people’s lives. He urged the APEC forum’s 21 member nations to discuss ways to improve the socio-economic standing of people living around the Pacific Ocean.

Zuckerberg said that breakthroughs in science and technology should be harnessed to help do things like connect everyone to the internet and cure all diseases.

“It’s a time for greatness,” Zuckerberg said. “With accelerating progress in science and technology, our generation has the potential to do more great things than at any other time in history.”

Here is his full speech: