more steps towards merging 2d and 3d kernels