compute correlation in parallel