use weighted_sample routine from the internet -- super fast!