Improve addEvent