extension to 3D