implement ordered sampling
Merge pull request #167 from one-more-minute/ordered-sample

Ordered sampling