New research says it pays to be nice, but not too nice