change to use d3d