pull out pearson coefficient code to seperate file