added function to return kernels after minimization