Finished corr function
Finished corr function