added d3d basic code