added better handling of events
version bumped