Pruning function integrated