implemented stratified sampling for Worksets