implemented Pearson distance and their test