Length variable is passed to kernels