Pearson distance function added