fixed register for an event
added modify vent function