This is more efficient, since we only have to look up `state_key` in the event dict once, rather than three (!) times.