tweak random functions.