events are now properly implemented