added logging for events