Update for new kernel

credit: codeworkx