added support for events overwriting existing values