support for new option --sample to limit number of observations