added functions for diversity indices