added function to cal test random kernel