helper set the events