work on the polynomial and linear kernels