More flexible way to apply passes