added compute correlator function