Implemented Pearson r to the comparing function