clean up p-value function