modified purging pipeline