Adding ability to emit event