combined piecewise/pruning now passing all tests