Updated the prototype of kernel
Implemented the callback