run stages conditionally