write functios for tab quant, fData, pData