module for diversity measures