Added setEvent functionality