random stratified sampling, closes #8