Added code for diffusion event handling