add const for kernel