Changed to random sample to return an object