Differentiating with conditional activities