add pruning method