factorizedCorr functions in containted header