add original pruning code back