simplify logic for history based pruning