add event hook example