the less naive random selection algo