add runWhen example