teaked p-value calculation