added initial support for events