examples added how to use events