implemented CPDI2 3D, need debugging