add random number generator function
tutorial 19 - particle