added algorith for calculate pearson