Adding support for events