add functions to calculate two flow correlations, still need to debug