changed kernel and added more functionality to customKernel