first brief implementation of random number genrator