random number generator as well as samples init added