reducing leaps to mild bounds
using sampleowner to construct a sample, and using a unique_ptr