Added getDiff function to calculate diffusion rate. Untested.