fixing to calculate corelation in each place