Children's use of counterfactual thinking in causal reasoning