added zscore calculation and output to the .result file