pruning code