random_fun - updated scripts - better performance
random_fun - small optimizations