add ability to emit events