Finished working script, outputs p-value