Add pruning method.