a sophisticated version of stratified sampling added