kernel with random number generator