more work on 3D implementation