Kernel now generated for 3 main cases