refactor diversity