Function for diversity according to our paper, not just makowski