added some functions to Q2D and Q3D