use new addEvent function to bind events