Lorne Ahrens, Michael Krol, Michael Smith, Brent Thompson, and Patrick Zamarripa. Those were the names that brought President Barack Obama to Dallas on Tuesday for a memorial in honor of the five officers, who were killed by a sniper last week. But during his remarks, there were likely also two other names on his mind: Alton Sterling and Philando Castile.

Micah Johnson carried out a mass shooting at the end of a Dallas Black Lives Matter protest, which was held after police officers killed Sterling in Louisiana and Castile in Minnesota last week. After the three separate tragedies, it’s hard to do anything but despair, but Obama’s speech during the service called for both hope and accountability, echoing sentiments expressed by Dallas Mayor Mike Rawlings and Dallas Police Chief David Brown in the days following the shooting. All three leaders acknowledged that we can’t look at this tragedy without forgetting what happened leading up to it. 

On Friday, Rawlings spoke at a vigil in Dallas’s Thanks-Giving Square, condemning the tragedy while refusing to “shy away from the very real fact that we as a city, as a state, as a nation, are struggling with racial issues.” His speech went on to call for the ability to hold true the “two opposing ideas” of supporting police officers while condemning police brutality.

“I believe in dealing with this issue, we must step up our game and approach complicated issues in a different way,” he added. “And race is complicated.”

On Monday, Chief Brown won over the nation with his blunt and open manner during a press conference. Some of his comments raised concern, notably the challenge for protesters to “serve [their] community” by joining the police force, telling them to “Get off of the protest line and put your application in.” Statements like that are full of harmful assumptions, namely that protesting injustices does not serve communities. But Brown also conceded that there’s work to be done when it comes to the nation’s racism, especially in the police force. “It’s my normal to live in a society that’s had a long history of racial strife. We’re in a much better place than we were when I was a young man here, but we have much work to do, particularly in our own profession,” he said. “Leaders in my position need to put their careers on the line to make sure we do things right.”

There’s some hope that both Brown and Rawlings understand the importance of legitimizing and addressing the concerns of the Black Lives Matter movement even while mourning the loss of police officers. Obama had a similar message during his speech. Dallas and the nation came together in mourning for the five officers killed, but they should also come together for people like Sterling and Castile. And in order for that unity in mourning to result in productive policy changes, there has to be accountability for the role systemic and institutional racism played in last week’s tragedies.

“When all this takes place, more than 50 years after the passage of the Civil Rights Act, we cannot simply turn away and dismiss those in peaceful protest as troublemakers or paranoia,” Obama said.

These statements are especially necessary when other political leaders such as Lieutenant Governor Dan Patrick have tried to blame Black Lives Matter protestors for the Johnson’s actions. In the face of these kinds of accusations, Obama’s speech—along with Rawlings’s and Brown’s statements—however imperfect, are examples of how we can as a nation, mourn for victims of police brutality, mourn for the fallen officers, and take the concerns of the Black Lives Matter movement seriously. As Ta-Nehisi Coates explained in The Atlantic, a willingness to tackle how racism has influenced policing in this country isn’t just important, but necessary to keep both citizens and police officers safe. Whether that will happen remains to be seen, but having leaders such as Rawlings, Brown, and Obama encouraging that understanding provides some measure of hope.

Obama put it best during his speech: “If we’re to sustain unity, we need to get through these difficult times. If we are to honor these five outstanding officers who we lost, then we will need to act on the truths that we know.” We owe that Alton Sterling, Philando Castile, Lorne Ahrens, Michael Krol, Michael Smith, Brent Thompson, and Patrick Zamarripa.