better computation of Y for packs