Implement the new event API