updating 3D reg code to latest