added function to test random kernels