added events to example