trivial piece of code that subsamples a file.