New feature --sample to extract sampled trees