change RNG function