Here’s how to stop the next tragedy