adding event trigger