update for new rand method