updated p-values calculation