adding kernel with private and local memory