.
american roulette algorithm udfs