added argument 'excludeLegacyPipelines'