pull out diversities calculation