updated computeMetrics script