When and how does diversity increase group performance?