added events and basic event handling