added logging to events