pruning script begin