2-pass TPMMS algorithm for ∪B