implemented pruning based on MINLENGTH