added array implementation for kernel