added simple conditionals based on flag variables (expressions not yet supported)