Adapt to 3d framework