add option for pruning threshold