added functions for estimating correlations