docs for events and hooks