changes to p-value function