Added code to support computing diversity for all populations