better appendEvent handling