added event notifications
merged events code