Added diffusion calculation