pruning and training