updated stratifiedSample to use selection-rejection to select samples on each partition in 1 pass, rather than pre-selecting indices