added function in header of d3dclass