simplified addEvent method