2d kernel stuff