computes correlation for a series of files