added optimisation for event API